home *** CD-ROM | disk | FTP | other *** search
/ Chip: Internet / Chip Internet.iso / viewer / gsnt / makefile < prev    next >
Makefile  |  1994-02-12  |  8KB  |  310 lines

  1. !include <ntwin32.mak>
  2. #    Copyright (C) 1991, 1992 Aladdin Enterprises.  All rights reserved.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS MSC 7.0 platform.
  21. # Thanks to Phil Conrad and Thomas Hiller for earlier versions of this file.
  22.  
  23. # NOTE: Do NOT compile iscan.c or gdevpcfb.c with optimization.
  24.  
  25. # ------------------------------- Options ------------------------------- #
  26.  
  27. ###### This section is the only part of the file you should need to edit.
  28.  
  29. # ------ Generic options ------ #
  30.  
  31. # Define the default directory/ies for the runtime
  32. # initialization and font files.  Separate multiple directories with \;.
  33. # Use / to indicate directories, not a single \.
  34.  
  35. GS_LIB_DEFAULT=e:/gs\;e:/gs/fonts
  36.  
  37. # Define the name of the Ghostscript initialization file.
  38. # (There is no reason to change this.)
  39.  
  40. GS_INIT=gs_init.ps
  41.  
  42. # Choose generic configuration options.
  43.  
  44. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  45. # Code runs substantially slower even if no debugging switches are set,
  46. # and also takes about another 25K of memory.
  47.  
  48. #DEBUG=0
  49.  
  50. # Setting TDEBUG=1 includes symbol table information for the debugger,
  51. # and also enables stack checking.  Code is substantially slower and larger.
  52.  
  53. TDEBUG=0
  54.  
  55. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  56. # so they are visible to the debugger and profiler.
  57. # No execution time or space penalty, just larger .OBJ and .EXE files.
  58.  
  59. NOPRIVATE=0
  60.  
  61. # Define the name of the executable file.
  62.  
  63. GS=gsnt
  64.  
  65.  
  66. # ------ Platform-specific options ------ #
  67.  
  68. # Define the drive, directory, and compiler name for the Microsoft C files.
  69. # COMP is the full compiler path name (normally \msc\bin\wcc386p).
  70. # LINK is the full linker path name (normally \msc\bin\link).
  71. # CLINK is the compile-and-link utility full path name (normally
  72. #   \msc\bin\link).
  73. # INCDIR contains the include files (normally \msc\include).
  74. # LIBDIR contains the library files (normally \msc\lib).
  75. # Note that INCDIR and LIBDIR are always followed by a \,
  76. #   so if you want to use the current directory, use an explicit '.'.
  77.  
  78. COMP=e:\mstools\bin\cl386
  79. LINK=e:\mstools\bin\link32
  80. CLINK=e:\mstools\bin\cl386
  81. INCDIR=e:\mstools\h
  82. LIBDIR=e:\mstools\lib
  83.  
  84. # Define the processor (CPU) type.  Currently the only acceptable value
  85. # is 286.  (386 and 486 should be supported, but MSC apparently doesn't
  86. # provide any way to generate 16-bit code if you tell it you have a
  87. # 32-bit processor.)
  88.  
  89. CPU_TYPE=486
  90.  
  91. # Define the math coprocessor (FPU) type.
  92. # Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
  93. # but do not require a FPU), 87, 287, or 387.
  94. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  95. # CPU includes the equivalent of an 80387 on-chip.
  96. # An xx87 option means that the executable will run only if a FPU
  97. # of that type (or higher) is available: this is NOT currently checked
  98. # at runtime.
  99.  
  100. FPU_TYPE=0
  101.  
  102. # ---------------------------- End of options ---------------------------- #
  103.  
  104. # Define the platform name.
  105.  
  106. PLATFORM=nt_
  107.  
  108. # Define the name of the makefile -- used in dependencies.
  109.  
  110. MAKEFILE=makefile
  111.  
  112. # Define the ANSI-to-K&R dependency.  Microsoft C accepts ANSI syntax,
  113. # but we need to preconstruct ccf.tr to get around the limit on
  114. # the maximum length of a command line.
  115.  
  116. AK=ccf.tr
  117.  
  118. # Define the extensions for the object and executable files.
  119.  
  120. OBJ=obj
  121. XE=.exe
  122.  
  123. # Define the current directory prefix, shell quote string, and shell name.
  124.  
  125. EXPP=
  126. QQ="\"
  127. SH=
  128. SHP=
  129.  
  130. # Define the generic compilation flags.
  131.  
  132. PLATOPT=
  133.  
  134. INTASM=
  135. PCFBASM=
  136.  
  137. # Define the generic compilation rules.
  138.  
  139. .asm.obj:
  140.     $(ASM) $(ASMFLAGS) $<;
  141.  
  142. # Make sure we get the right default target for make.
  143.  
  144. all: $(AK) echogs$(XE) genarch$(XE) genconf$(XE) $(GS)$(XE)
  145.  
  146. # Define the compilation flags.
  147.  
  148. !if $(CPU_TYPE)>400
  149. CPFLAGS=/G4
  150. !else
  151. !if $(CPU_TYPE)>300
  152. CPFLAGS=/G3
  153. !else
  154. !if $(CPU_TYPE)>200
  155. CPFLAGS=/G2
  156. !else
  157. !if $(CPU_TYPE)>100
  158. CPFLAGS=/G1
  159. !else
  160. CPFLAGS=/G0
  161. !endif
  162. !endif
  163. !endif
  164. !endif
  165.  
  166. DEFS = -D_X86_=1 -D_CRTAPI1=__cdecl -D_CRTAPI2=__cdecl -Dtry=__try \
  167.        -Dleave=__leave -Dexcept=__except -Dfinally=__finally -DWIN32 \
  168.        -DCHECK_INTERRUPTS -DNOSYSTIME
  169.  
  170. FPFLAGS=/Gdfy $(DEFS)
  171.  
  172. !if $(NOPRIVATE)!=0
  173. CP=/DNOPRIVATE
  174. !else
  175. CP=
  176. !endif
  177.  
  178. !if $(TDEBUG)!=0
  179. CD=/DDEBUG
  180. !else
  181. CD=
  182. !endif
  183.  
  184. !if $(TDEBUG)!=0
  185. CT=/Zi /Od
  186. LCT=
  187. !else
  188. CT=
  189. LCT=
  190. !endif
  191.  
  192. GENOPT=$(CP) $(CD) $(CT) $(CS) /W2 /nologo
  193.  
  194. CCFLAGS=$(PLATOPT) $(FPFLAGS) $(CPFLAGS)
  195. CC=$(COMP) /c $(cdebug) $(CCFLAGS) @ccf.tr
  196. CCL=$(CLINK)
  197. CCC=$(CC) /Za
  198. CCCE=$(CC)
  199. CCD=$(CC) /Za
  200. CCINT=$(CC) /Za
  201.  
  202. .c.obj:
  203.     $(CCC) $<
  204.  
  205. # Define the files to be removed by `make clean'.
  206. # nmake expands macros when encountered, not when used,
  207. # so this must precede the !include statements.
  208.  
  209.  
  210. # -------------------------- Auxiliary programs --------------------------- #
  211.  
  212. ccf.tr: $(MAKEFILE)
  213.         touch ccf.tr
  214.  
  215. echogs$(XE): echogs.c
  216.     $(CCL) $(CCFLAGS) echogs.c setargv.obj binmode.obj $(conlibs)
  217.  
  218. genarch$(XE): genarch.c
  219.     $(CCL) $(CCFLAGS) genarch.c setargv.obj binmode.obj $(conlibs)
  220.  
  221. genconf$(XE): genconf.c
  222.     $(CCL) $(CCFLAGS) genconf.c setargv.obj binmode.obj $(conlibs)
  223.  
  224. # ------ Devices and features ------ #
  225.  
  226. # Choose the language feature(s) to include.  See gs.mak for details.
  227. # Since we have a large address space, we include the optional features.
  228.  
  229. FEATURE_DEVS=filter.dev dps.dev level2.dev
  230.  
  231. # Choose the device(s) to include.  See devs.mak for details.
  232. DEVICE_DEVS=mswin.dev mswinprn.dev
  233. DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  234. DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev
  235. DEVICE_DEVS5=epson.dev eps9high.dev ibmpro.dev bj10e.dev
  236. DEVICE_DEVS7=bmpmono.dev bmp16.dev bmp256.dev bmp16m.dev
  237. DEVICE_DEVS8=gifmono.dev gif8.dev bit.dev
  238.  
  239. !include gs.mak
  240. !include devs.mak
  241.  
  242. # -------------------------------- Library -------------------------------- #
  243.  
  244. # The Microsoft C platform
  245.  
  246. # Eventually we need a gp_imsc.$(OBJ)....
  247. nt__= gp_mswin.$(OBJ) gp_mswtx.$(OBJ) gp_nofb.$(OBJ) gp_nt.$(OBJ)
  248. nt_.dev: $(nt__)
  249.     $(SHP)gssetmod nt_ $(nt__)
  250.  
  251. gp_nt.$(OBJ): gp_nt.c $(string__h) $(gx_h) $(gp_h)
  252.  
  253. gp_mswtx.$(OBJ): gp_mswtx.c $(AK) gp_mswtx.h
  254.     $(CCCE) $*.c
  255.  
  256. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  257.  
  258. gp_mswin.$(OBJ): gp_mswin.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  259.     $(CCCE) $*.c
  260.  
  261. gdevmswn.$(OBJ): gdevmswn.c
  262.     $(CCCE) $*.c
  263.  
  264. gdevmsxf.$(OBJ): gdevmsxf.c
  265.     $(CCCE) $*.c
  266.  
  267. gdevwdib.$(OBJ): gdevwdib.c
  268.     $(CCCE) $*.c
  269.  
  270. gdevwddb.$(OBJ): gdevwddb.c
  271.     $(CCCE) $*.c
  272.  
  273. gdevwprn.$(OBJ): gdevwprn.c
  274.     $(CCCE) $*.c
  275.  
  276.  
  277.  
  278. # ----------------------------- Main program ------------------------------ #
  279.  
  280. BEGINFILES=gs*.res gs*.ico
  281. CCBEGIN=$(CCC) *.c
  282.  
  283. LIBDOS=$(LIBGS) obj.tr
  284.  
  285. # Interpreter main program
  286.  
  287. ICONS=gsgraph.ico gstext.ico
  288.  
  289. GS_ALL=$(ICONS) $(GS).rbj gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) \
  290.   $(LIBDOS) $(LIBCTR) obj.tr lib.tr $(GS).res $(GS).def
  291.  
  292. # Make the icons from their text form.
  293.  
  294. gsgraph.ico: gsgraph.icx echogs$(XE)
  295.         echogs -wb gsgraph.ico -n -X -r gsgraph.icx
  296.  
  297. gstext.ico: gstext.icx echogs$(XE)
  298.         echogs -wb gstext.ico -n -X -r gstext.icx
  299.  
  300. $(GS).res: $(GS).rc gp_mswin.h $(ICONS)
  301.         $(rc) $(rcvars) -r $(GS).rc
  302.  
  303. $(GS).rbj: $(GS).res
  304.     cvtres -$(CPU) $(GS).res -o $(GS).rbj
  305.  
  306. $(GS)$(XE): $(GS_ALL) $(ALL_DEVS)
  307.         -copy obj.tr+gsnt.tr ln.tr
  308.         $(link) $(ldebug) $(guiflags) -out:$@ -machine:$(CPU) @ln.tr \
  309.         $(GS).rbj binmode.obj $(guilibs) shell32.lib
  310.